<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./assets/iconfont/iconfont.css">
    <style>
        body{
            margin: 0;
            padding: 0;
            height: 3000px;
        }
        ul{
            margin: 0;
            list-style: none;
            padding: 0;
        }
        p{
            margin: 0;
            padding: 0;
        }
        .siderbar {
            width: 5px;
            top: 0;
            bottom:0;
            background-color: #666;
            position: fixed;
            right: 0;
        }

        .siderbar ul{
            position: absolute;
            width: 50px;
            min-height: 300px;
            /* border: 1px solid red; */
            right: 5px;
            top:50%;
            transform: translateY(-50%);
        }
        ul li{
            height: 50px;
            width: 50px;
            background-color: #666;
            margin-bottom: 1px;
            position: relative;
        }
        ul li .iconfont{
            display: block;
            color: #fff;
            font-size: 30px;
            line-height: 50px;
            text-align: center;
        }
        ul li:hover{
            background-color: red;
        }

        ul li p{
            background-color: red;
            width: 0px;
            height: 50px;
            position: absolute;
            right: 50px;
            top: 0;
            color: #fff;
            line-height: 50px;
            text-align: center;
            transition: width 1s;
            z-index: -1;
            white-space: nowrap;
            overflow: hidden;
        }

        ul li:hover p{
            width: 120px;
        }
    </style>
</head>
<body>
    <div class="siderbar">
        <ul>
            <li>
                <span class="iconfont icon-a-huihuakuang6"></span>
                <p>联系客服</p>
            </li>
            <li>
                <span class="iconfont icon-touxiang"></span>
                <p>京东会员</p>
            </li>
            <li>
                <span class="iconfont icon-gouwuche"></span>
                <p>购物车</p>
            </li>
            <li>
                <span class="iconfont icon-youhuiquan"></span>
                <p>优惠券</p>
            </li>
        </ul>
    </div>
</body>
</html>